﻿using Framework.Common;

namespace Framework.Resource
{
    /// <summary>
    /// 资源加载接口
    /// </summary>
    public interface ILoadAssetHelper
    {
        /// <summary>
        /// 加载资源进度事件
        /// </summary>
        event FrameworkAction<int> LoadProgressEvent;
        /// <summary>
        /// 加载完成事件
        /// </summary>
        event FrameworkAction<object> LoadCompleteEvent;
        /// <summary>
        /// 加载失败事件
        /// </summary>
        event FrameworkAction<string> LoadErrorEvent;
        /// <summary>
        /// 异步加载资源
        /// </summary>
        /// <param name="packageName">资源包名称</param>
        /// <param name="assetName">资源名称</param>
        void LoadAssetAsync(string packageName);
        /// <summary>
        /// 初始化接口
        /// </summary>
        void Init();
        /// <summary>
        /// 重置接口
        /// </summary>
        void Reset();
        /// <summary>
        /// 销毁
        /// </summary>
        void Destroy();
    }
}
